Guest User

Godzio!

a guest
Dec 11th, 2011
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3. #define SIZE 10
  4.  
  5. void wypisz(int tab[]) {
  6.     int i;
  7.     for (i = 0; i < SIZE; i++) {
  8.         if (tab[i] == 0)
  9.             continue;
  10.  
  11.         printf("%d ", tab[i]);
  12.     }
  13.     printf("\n");
  14. }
  15.  
  16.  
  17. /* test: */
  18.  
  19. int main(void) {
  20.     int tab[SIZE] = {1,2,0,4,5,6,0,8,9};
  21.     wypisz(tab);
  22.  
  23.     return 0;
  24. }
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment